for i in range (int(input())):
n = int(input())
if ((n/2)**0.5).is_integer() or ((n/4)**0.5).is_integer():
print('YES')
else:
print('NO')
#ifndef _GLIBCXX_NO_ASSERT
#include <cassert>
#endif
#include <cctype>
#include <cerrno>
#include <cfloat>
#include <ciso646>
#include <climits>
#include <clocale>
#include <cmath>
#include <csetjmp>
#include <csignal>
#include <cstdarg>
#include <cstddef>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#if __cplusplus >= 201103L
#include <ccomplex>
#include <cfenv>
#include <cinttypes>
#include <cstdbool>
#include <cstdint>
#include <ctgmath>
#include <cwchar>
#include <cwctype>
#endif
// C++
#include <algorithm>
#include <bitset>
#include <complex>
#include <deque>
#include <exception>
#include <fstream>
#include <functional>
#include <iomanip>
#include <ios>
#include <iosfwd>
#include <iostream>
#include <istream>
#include <iterator>
#include <limits>
#include <list>
#include <locale>
#include <map>
#include <memory>
#include <new>
#include <numeric>
#include <ostream>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <stdexcept>
#include <streambuf>
#include <string>
#include <typeinfo>
#include <utility>
#include <valarray>
#include <vector>
#if __cplusplus >= 201103L
#include <array>
#include <atomic>
#include <chrono>
#include <condition_variable>
#include <forward_list>
#include <future>
#include <initializer_list>
#include <mutex>
#include <random>
#include <ratio>
#include <regex>
#include <scoped_allocator>
#include <system_error>
#include <thread>
#include <tuple>
#include <typeindex>
#include <type_traits>
#include <unordered_map>
#include <unordered_set>
#include <cstdio>
#include <numeric>
typedef long long int ll;
// Geometry
//typedef std::complex<double> point;
//#define X real()
//#define Y imag()
//#define angle(a) (atan2((a).imag(), (a).real()))
//#define vec(a,b) ((b)-(a))
//#define same(p1,p2) (dp(vec(p1,p2),vec(p1,p2)) < EPS)
//#define dp(a,b) ( (conj(a)*(b)).real() ) // a*b cos(T), if zero -> prep
//#define cp(a,b) ( (conj(a)*(b)).imag() ) // a*b sin(T), if zero -> parllel
//#define length(a) (hypot((a).imag(), (a).real()))
//#define normalize(a) (a)/length(a)
//#define polar(r,ang) ((r)*exp(point(0,ang))) ==> Already added in c++11
//#define rotateO(p,ang) ((p)*exp(point(0,ang)))
//#define rotateA(p,ang,about) (rotateO(vec(about,p),ang)+about)
//#define reflectO(v,m) (conj((v)/(m))*(m))
// end of Geometry
// debuging
#define fast ios::sync_with_stdio(false) , cin.tie(NULL);
#define debug(x) cout << #x << "=" << x << endl
#define debug2(x, y) cout << #x << "=" << x << "," << #y << "=" << y << endl
#define debug3(x, y, z) cout << #x << "=" << x << "," << #y << "=" << y << "," << #z << "=" << z << endl
#define show(a) cout << "vector " << #a << " : " << endl ; for(auto e : a) cout << e << " "
#define endl '\n'
#define sz(x) (int)x.size()
// end of debuging
#endif
using namespace std;
//point reflect(point p, point p0, point p1) {
// point z = p-p0, w = p1-p0;
// return conj(z/w)*w + p0; // Refelect point p1 around p0p1
//}
//
//
//bool isCollinear(point a, point b, point c) {
// return fabs( cp(b-a, c-a) ) < EPS;
//}
//
//bool isPointOnRay(point p0, point p1, point p2) {
// if(length(p2-p0) < EPS) return true;
// return same( normalize(p1-p0), normalize(p2-p0) );
//}
//
//bool isPointOnSegment(point a, point b, point c) {
// return isPointOnRay(a, b, c) || isPointOnRay(b, a, c);
//}
//
//
//double distToLine( point p0, point p1, point p2 ) {
// return fabs(cp(p1-p0, p2-p0)/length(p0-p1)); // area = 0.5*b*h
//}
//
//
//double distToSegment( point p0, point p1, point p2 ) {
// double d1, d2;
// point v1 = p1-p0, v2 = p2-p0;
// if( (d1 = dp(v1, v2) ) <= 0) return length(p2-p0);
// if( (d2 = dp(v1, v1) ) <= d1) return length(p2-p1);
// double t = d1/d2;
// return length(p2 - (p0 + v1*t) );
//}
//const int N=1e5+5, M=1e3+5, MOD=1e9+7,OO=0x3f3f3f3f;
//const ll LOO=0x3f3f3f3f3f3f3f3f;
//const long double EPS=1e-20;
// file input / output
// freopen("input.txt", "r", stdin);
// freopen("output.txt", "w", stdout);
bool check(ll n ){
ll f = sqrt((double)n);
return (f * f == n) ;
}
bool ok(){
ll n ; cin >> n ;
if((!(n % 2) && check(n / 2) ) || ((n % 4 == 0) && check(n / 4)) ) return true ;
return false ;
}
void taste_case(){
cout << (ok() ? "YES" : "NO") << endl ;
}
int main(){
fast ;
int tt = 1;
cin >> tt ;
while(tt--){
taste_case();
}
return 0 ;
}
1302. Deepest Leaves Sum | 1209. Remove All Adjacent Duplicates in String II |
994. Rotting Oranges | 983. Minimum Cost For Tickets |
973. K Closest Points to Origin | 969. Pancake Sorting |
967. Numbers With Same Consecutive Differences | 957. Prison Cells After N Days |
946. Validate Stack Sequences | 921. Minimum Add to Make Parentheses Valid |
881. Boats to Save People | 497. Random Point in Non-overlapping Rectangles |
528. Random Pick with Weight | 470. Implement Rand10() Using Rand7() |
866. Prime Palindrome | 1516A - Tit for Tat |
622. Design Circular Queue | 814. Binary Tree Pruning |
791. Custom Sort String | 787. Cheapest Flights Within K Stops |
779. K-th Symbol in Grammar | 701. Insert into a Binary Search Tree |
429. N-ary Tree Level Order Traversal | 739. Daily Temperatures |
647. Palindromic Substrings | 583. Delete Operation for Two Strings |
518. Coin Change 2 | 516. Longest Palindromic Subsequence |
468. Validate IP Address | 450. Delete Node in a BST |